Fix login/signup in Docker deployments behind reverse proxy#80
Merged
antosubash merged 3 commits intomainfrom Apr 5, 2026
Merged
Fix login/signup in Docker deployments behind reverse proxy#80antosubash merged 3 commits intomainfrom
antosubash merged 3 commits intomainfrom
Conversation
Three issues prevented auth from working at app.simplemodule.dev: 1. No ForwardedHeaders middleware — the app behind a reverse proxy saw Request.Scheme as "http" and Request.Host as "localhost:8080" instead of the real values, breaking cookie security, redirects, and email confirmation links. 2. OpenIddict client redirect URIs were seeded with https://localhost:5001 because OpenIddict:BaseUrl was never configured in docker-compose.yml. Added APP_BASE_URL env var support (defaults to http://localhost:8080). 3. The seed service skipped updating an existing OAuth client, so changing BaseUrl after initial seeding had no effect. Now it updates redirect URIs on every startup to match the current configuration.
Sets the OAuth redirect URI base to https://app.simplemodule.dev so login and signup work correctly in production without requiring an environment variable override.
Move UseForwardedHeaders before UseExceptionHandler so all downstream middleware sees the correct scheme/host/IP. Fix log message that said "redirect URIs" when the full client descriptor is updated.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three issues prevented auth from working at app.simplemodule.dev:
No ForwardedHeaders middleware — the app behind a reverse proxy saw
Request.Scheme as "http" and Request.Host as "localhost:8080" instead
of the real values, breaking cookie security, redirects, and email
confirmation links.
OpenIddict client redirect URIs were seeded with https://localhost:5001
because OpenIddict:BaseUrl was never configured in docker-compose.yml.
Added APP_BASE_URL env var support (defaults to http://localhost:8080).
The seed service skipped updating an existing OAuth client, so changing
BaseUrl after initial seeding had no effect. Now it updates redirect
URIs on every startup to match the current configuration.